<?php

namespace app\api\controller\v1\activity;

use app\services\activity\ActivityService;

class StoreActivityController
{
    protected $service;

    public function __construct(ActivityService $service)
    {
        $this->service = $service;
    }

    public function list()
    {
        $list = $this->service->getlist();
        return app('json')->success($list);
    }

    public function detail()
    {
        $id = request()->get('id') ?? 0;
        $detail = $this->service->getDetail($id);
        return app('json')->success($detail);
    }
}